package com.majie.annotation;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyConditionalConfig {
	//标记多个只返回一个
	@Bean
	@Conditional(MyConditional.class)
	public One one( ) {
		return new One();
	}

	@Bean
	@Conditional(MyConditional.class)
	public Two two( ) {
		return new Two();
	}
}